import request from "../utils/request";

export const reqRegister = ({ username, stunum, password, role}) => request({
    url: '/login/register',
    data: {
        name: username,
        userId: stunum,
        userPwd: password,
        role
    },
    method: 'POST'
})

export const reqLogin = ({ userId, password, role}) => request({
    url: '/login/LoginAcc',
    data: {
        userId,
        password,
        role
    },
    method: 'POST'
})

export const reqTree = () => request({
    url: 'getTree'
})

export const reqStudentDetail = (params) => request({
    url: '/student/getStu',
    params,
    method: 'post'
})

export const reqTeacherDetail = () => request({
    url: '/teacher/getAllTeacher',
    data: {
        level: 1
    },
    method: 'post'
})